package com.bluesky.plum.uimodels.render.swing.components.menu;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

public class SMenu extends
		com.bluesky.plum.uimodels.standard.components.menu.Menu {

	protected JMenu menu;

	public SMenu() {
		menu = new JMenu("M");
	}

	@Override
	public void addMenuItem(
			com.bluesky.plum.uimodels.standard.components.menu.MenuItem menuItem) {

		super.addMenuItem(menuItem);
		
		menu.add((JMenuItem) menuItem.getNativeComponent());
	}

	@Override
	public Object getNativeComponent() {

		return menu;
	}

	@Override
	public void setCaption(String caption) {
		super.setCaption(caption);

		menu.setText(caption);

	}
}
